1. Field of the Invention
The present invention relates to an image processing apparatus and an image processing method, which can perform region segmentation processing on a document image.
2. Description of the Related Art
Recent digital copying machines have multiple functions including basic functions, such as a COPY function that enables a user to copy a document, a PDL function that enables a user to print a document received from a host computer, and a SEND function that enables a user to send a document from the copying machine to an external device via a network. Furthermore, the copying machines have additional functions, such as a BOX function that enables a user to store a copied document image or a PDL document in a storage device provided in the copying machine, and an EDIT function that enables a user to reuse a document image stored in a BOX (for combination, bookbinding, etc.).
To satisfy the need for high-quality images and higher reproducibility of documents, the resolution for image processing is speedily increasing from 600 dpi or 1200 dpi to 2400 dpi and the bit number of signals is increasing from 8 bits or 10 bits to 12 bits. To this end, copying machines increase their memory (or storage) capacity and install a high-performance central processing unit (CPU) capable of processing bitmap data carrying a great amount of information. Accordingly, the developing and manufacturing costs for the devices are increasing.
Meanwhile, as discussed in U.S. Patent Application Publication No. US 2005/0111053, a conventional image processing method includes separating a read document into a plurality of regions, storing segmented regions, and reusing the segmented regions for editing an image. To this end, an image processing apparatus classifies regions constituting a document into text, graphics, and image regions and processes each classified region according to the attribute of each region.
For example, the image processing apparatus performs vectorization processing on text and graphics regions to store vector data. Furthermore, the image processing apparatus converts an image region into Joint Photographic Experts Group (JPEG) data and stores the JPEG data for editing. The method uses vector data, which is easy to edit and modify, instead of processing high-resolution and multi-bit bitmap data containing a great amount of information. Therefore, the method can reduce the costs and can improve the operability while improving the image quality and usability.
An image processing apparatus discussed in U.S. Pat. No. 7,170,647 performs region segmentation based on a binary image including white and black pixels. An image processing method includes extracting an assembly of black pixel blocks and an assembly of white pixel blocks from a binary image, and identifying text, graphics, and image regions according to the shape, size, and state of each assembly.
If an object document image is a color image, an image processing apparatus converts the color image into a binary image beforehand and performs region segmentation on the obtained binary image. The binarization processing applied to a color image includes obtaining a histogram of a document image and determining a threshold based on a distribution of the brightness (luminance) of pixels. Furthermore, the binarization processing includes comparing the luminance of each pixel constituting the document image with the obtained threshold to convert the pixel into a white pixel or a black pixel.
However, the object-based region segmentation processing, if applied to document data entered from a scanner or transmitted from a personal computer (PC), may fail to accurately segment an image into regions.
Such a problem may arise if an object region includes a background portion (colored partial region) as illustrated in FIG. 3A, because the region segmentation is dependent on the above-described binarization. To solve this problem, the image processing apparatus discussed in U.S. Pat. No. 7,170,647 checks a background color level of each region constituting a document and changes the above-described binarization threshold for each region.
To binarize a color image, the image processing apparatus discussed in U.S. Pat. No. 7,170,647 determines a plurality of thresholds, the total number of which corresponds to the number of background colors, based on a histogram of luminance values obtained from the color image, and produces binary images for respective background colors based on the obtained thresholds.
Accordingly, to process a document having a plurality of background color levels, the image processing apparatus requires a plurality of page memories corresponding to the total number of backgrounds colors. More specifically, the number of memories for removing background colors and performing region segmentation and the number of memories for storing segmented regions are equivalent to “A4 document×number of background colors” if the document is an A4 document.
The image processing apparatus does not display a segmented region individually. Accordingly, a user cannot easily find an erroneously segmented region on a previewed document image. On the other hand, if a user interface (UI) displays each segmented region, the display of an erroneously segmented region may be excessively large.
It is generally difficult to perfectly perform the region segmentation processing. Accordingly, it is required to address a case where regions cannot be automatically segmented. For example, if a region overlapped with a background color has a color similar to the background color, automatically accomplishing the region segmentation processing is difficult. Therefore, an appropriate correction is necessary to obtain a satisfactory result.